﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository.Mapping
{
    class FixincomesecuritiesPurchaseMap : ClassMap<FixincomesecuritiesPurchase>
    {
        public FixincomesecuritiesPurchaseMap()
        {
            Table("FIXINCOMESECURITIES_PURCHASE");
            Id(x => x.FixincomesecuritiesPurchaseId, "FIXINCOMESECURITIES_HEADER_ID").GeneratedBy.Identity();
            Id(x => x.FixincomesecuritiesPurchaseId, "FIXINCOMESECURITIES_PURCHASE_ID");
            Map(x => x.FixincomesecuritiesHeaderId, "FIXINCOMESECURITIES_HEADER_ID");
            Map(x => x.TransactionType, "TRANSACTION_TYPE");
            Map(x => x.PurchaseId, "PURCHASE_ID");
            Map(x => x.RefNo, "REF_NO");
            Map(x => x.TypeofpaymentName, "TYPEOFPAYMENT_NAME");
            Map(x => x.TypeofpaymentId, "TYPEOFPAYMENT_ID");
            Map(x => x.TIME2MATURE, "TIME2MATURE");
            Map(x => x.TradeDate, "TRADE_DATE");
            Map(x => x.SettlementDate, "SETTLEMENT_DATE");
            Map(x => x.Unit, "UNIT");
            Map(x => x.TotalSize, "TOTALSIZE");
            Map(x => x.Par, "PAR");
            Map(x => x.ParValue, "PAR_VALUE");
            Map(x => x.Yield, "YIELD");
            Map(x => x.CleanPrice, "CLEAN_PRICE");
            Map(x => x.AI, "AI");
            Map(x => x.GrossPrice, "GROSS_PRICE");
            Map(x => x.DiscountPremium, "DISCOUNT_PREMIUM");
            Map(x => x.Physical, "PHYSICAL");
            Map(x => x.KeepAt, "KEEP_AT");
            Map(x => x.CounterpartyName, "COUNTERPARTY_NAME");
            Map(x => x.CounterpartyId, "COUNTERPARTY_ID");
            Map(x => x.PurchaseValueTh, "PURCHASE_VALUE_TH");
            Map(x => x.Currency, "CURRENCY");
            Map(x => x.ExchRate, "EXCH_RATE");
            Map(x => x.PurchaseValueForeign, "PURCHASE_VALUE_FOREIGN");
            Map(x => x.Related, "RELATED");
            Map(x => x.IndexRatio, "INDEX_RATIO");
            Map(x => x.RemarkOic, "REMARK_OIC");
            Map(x => x.CreateUserId, "CREATE_USER_ID");
            Map(x => x.CreateTs, "CREATE_TS");
            Map(x => x.UpdateUserId, "UPDATE_USER_ID");
            Map(x => x.UpdateTs, "UPDATE_TS");
            Map(x => x.RemainUnit, "REMAIN_UNIT");

        }


    }

}
